

package net.qiqbframework.loadhanding;

import lombok.extern.slf4j.Slf4j;
import net.qiqbframework.commandhandling.CommandCallback;
import net.qiqbframework.common.Assert;
import net.qiqbframework.modelling.domain.AggregateModelFactory;

@Slf4j
public class AggregateLoadBusImplBuilder {


    protected AggregateModelFactory aggregateModelFactory;


    public DefaultAggregateLoadBus build() {
        return new DefaultAggregateLoadBus(this);
    }

    public AggregateLoadBusImplBuilder aggregateModelFactory(AggregateModelFactory aggregateModelFactory) {
        this.aggregateModelFactory = aggregateModelFactory;
        return this;
    }

    protected void validate() {
        // Method kept for overriding
        Assert.nonNull(aggregateModelFactory, () -> "aggregateModelFactory not null");
    }

}
